<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>提现记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="../default/css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="../default/css/index.css"/>
    <style type="text/css">
        .mui-content {
            background: #fff;
            min-height: 100%;
        }

        .mui-table-view:before {
            height: 0;
        }

        .mui-table-view:after {
            background-color: #F5F6F7;
        }

        .mui-table-view-cell:after {
            background-color: #F5F6F7;
        }


        .nocase-box {
            display: none;
        }
        .mui-card-content-inner p{
            margin: 10px auto;
        }
    </style>
</head>
<body>

<header class="mui-bar mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left backahter"></a>
    <h1 class="mui-title">提现记录</h1>
</header>

<div class="mui-content">
    <!--<div class="mui-content-padded mui-text-center">
        <h5>总计提现</h5>
        <h3 style="margin: 1.625rem auto;">55.06元</h3>
    </div>-->
    <div class="top-shadow"></div>
    <ul class="mui-table-view" id="wirecord-list">

    </ul>
    <div class="nocase-box">
        <div class="mui-table">
            <div class="mui-col-xs-12 mui-col-sm-12 mui-text-center">
                <img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/zq-news/images/nocase.png" alt="">
            </div>
            <div class="mui-col-xs-12 mui-col-sm-12 mui-inline mui-text-center">
                <h4>暂无记录</h4>
                <h5 style="margin-top: 20px;">你为进行任何操纵</h5>
                <button type="button" class="mui-btn mui-btn-warning cash-withdrawal-btn">返回</button>
            </div>
        </div>
    </div>

</div>
<script src="../default/js/jquery-2.14.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/cookie.js"></script>
<script src="../default/js/code.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/index.js" type="text/javascript" charset="utf-8"></script>
<script src="../default/js/public.js"></script>
<script>
    mui.init({
        swipeBack: true //启用右滑关闭功能
    });

    mui.showLoading("正在加载..", "div");
    // ajax地址

    $(function () {
        querySubordinate();
    })

    function querySubordinate() {
        // 查出用户的所有下级用户
        mui.showLoading("正在加载..","div");
        $.ajax({
            url: website + '/CashWithdrawalController/findByUserId',
            type: 'post',
            data: {userId: userId},
            success: function (data) {
                var html = '';
                if(data.data.length == 0){
                    $(".nocase-box").show();
                    mui.hideLoading();
                }else {
                    data.data.forEach(function (value) {
                        html+='<li class="mui-table-view-cell">\n' +
                            '            <div class="mui-card">\n' +
                            '                <div class="mui-card-header">\n' +
                            '                    <p>提现金额: '+value.cashWithdrawalAmount+'</p>\n' +
                            '                    <p>实际到账金额:'+value.cashWithdrawalAmount1+'</p>\n' +
                            '                </div>\n' +
                            '                <div class="mui-card-content">\n' +
                            '                    <div class="mui-card-content-inner">\n' +
                            '                        <p>支付宝姓名:'+value.alipayName+'</p>\n' +
                            '                        <p>支付宝号:'+value.alipay +'</p>\n' +
                            '                        <p>提现状态:'+value.cashWithdrawalStatus+'</p>\n' +
                            '                        <p>提现时间:'+value.cashWithdrawalTime+'</p>\n' +
                            '                    </div>\n' +
                            '                </div>\n' +
                            '                <div class="mui-card-footer">\n';
                            if(value.paymentTime==null){
                                html+='<p>打款时间:未打款</p>'
                            }else {
                                html+='<p>打款时间:'+value.paymentTime+'</p>'
                            }
                            html+= '<p>提现方式:'+value.withdrawals+'</p>'
                                '                </div>\n' +
                                '            </div>\n' +
                                '        </li>'
                    })
                    $("#wirecord-list").append(html);
                    mui.hideLoading();
                }

            }, error: function () {
                mui.showLoading("发生错误,返回首页..", "div");
                setTimeout(function () {
                    window.location.href = 'http://newst.whilte.com/index.html';
                },1000)
            }
        });
    };

    mui('.nocase-box').on('tap', '.cash-withdrawal-btn', function(e) {
        mui.openWindow({
            url: 'task.html'
        });
    });

    mui('header').on('tap', '.backahter', function (e) {
        mui.openWindow({
            url: 'upwallet.html'
        });
    });



</script>
</body>
</html>
